class DefinitionsTagLib {

    def indexDefinition={attrs->
        if(attrs.controller && attrs.title){
            def tit=''
            if(attrs.titleInterno){
                tit=attrs.titleInterno
            }
            String html='<h2 align="center">'+message(code:attrs.title)+'</h2><center>'
            html+='<table class="principal"><tr>'
            html+='<td class="principal"><div id="definicion_show" align="center"><img src=\"/images/loading-gif-animation.gif\"/></div></td>'
            html+='<td class="principal"><div id="definicion_list" align="center"><img src=\"/images/loading-gif-animation.gif\"/></div></td>'
            html+='</tr></table></center>'
            html+='<script>'
            html+='goTo("'+attrs.controller+'","create","'+tit+'","definicion_show");'
            html+='goTo("'+attrs.controller+'","list","'+tit+'","definicion_list");'
            html+='</script>'
            out<<html
        }else{
            out <<'Incorrecta definicion para este tag "panelReporte"'
        }

    }
    
    def indexDefinitionSimple={attrs->
        if(attrs.controller && attrs.title){
            def tit=''
            if(attrs.titleInterno){
                tit=attrs.titleInterno
            }
            String html='<h2 align="center">'+message(code:attrs.title)+'</h2><center>'
            html +='<div align="center">'
            html+='<table class="principal" style="width: 70%;" align="center" ><tr>'
            html+='<td class="principal"><div id="definicion_show" align="center"><img src=\"/images/loading-gif-animation.gif\"/></div></td>'
            html+='</tr></table></div></center>'
            html+='<script>'
            html+='goTo("'+attrs.controller+'","'+attrs.action+'","'+tit+'","definicion_show");'
            html+='</script>'
            out<<html
        }else{
            out <<'Incorrecta definicion para este tag "panelReporte"'
        }
    } 
    def indexDefinitionList={attrs->
        if(attrs.controller && attrs.title){
            def tit=''
            if(attrs.titleInterno){
                tit=attrs.titleInterno
            }
            String html='<h2 align="center">'+message(code:attrs.title)+'</h2><center>'
            html +='<div align="center">'
            html+='<table class="principal" style="width: 70%;" align="center" ><tr>'
            html+='<td class="principal"><div id="definicion_list" align="center"><img src=\"/images/loading-gif-animation.gif\"/></div></td>'
            html+='</tr></table></div></center>'
            html+='<script>'
            html+='goTo("'+attrs.controller+'","'+attrs.action+'","'+tit+'","definicion_list");'
            html+='</script>'
            out<<html
        }else{
            out <<'Incorrecta definicion para este tag "panelReporte"'
        }
    }
}
